Skip to content

Use deepwork CLI for hook commands instead of python -m#130

Merged
nhorton merged 1 commit intomainfrom
claude/migrate-to-deepwork-hooks-Ogszc
Jan 23, 2026
Merged

Use deepwork CLI for hook commands instead of python -m#130
nhorton merged 1 commit intomainfrom
claude/migrate-to-deepwork-hooks-Ogszc

Conversation

@nhorton
Copy link
Contributor

@nhorton nhorton commented Jan 23, 2026

Summary

Replace direct Python module invocation (python -m deepwork.hooks.rules_check) with the deepwork hook CLI command for better portability and maintainability.

Changes

  • hooks_syncer.py: Updated get_command() to extract the hook name from the module path and use the deepwork hook {name} CLI format instead of python -m {module}
  • settings.json: Updated hook command examples to use the new CLI format
  • architecture.md: Updated documentation to reflect the new hook command format
  • test_hooks_syncer.py: Updated test assertion to expect the new command format

Benefits

  • Portability: The deepwork hook CLI command works regardless of how deepwork is installed (pip, poetry, editable mode, etc.)
  • Maintainability: Centralizes hook execution logic in the CLI layer rather than relying on Python module paths
  • User Experience: Simpler, more intuitive command format for users

Use the portable `deepwork hook` CLI command instead of direct Python
module invocation. This ensures hooks work consistently across all
installation methods (Nix flake, pipx, uv, pip).

https://claude.ai/code/session_01BPfXueRHYbYPHGjQpMbyn5
@nhorton nhorton merged commit 60f71e5 into main Jan 23, 2026
4 checks passed
@nhorton nhorton deleted the claude/migrate-to-deepwork-hooks-Ogszc branch January 23, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants